<template>
  <div>
    <header-comm></header-comm>
    <div class="bcg">
      <div class="xw_box">
        <a-tabs type="card" :default-active-key="tab_xw" :activeKey="tab_xw" @change="xwback">
          <a-tab-pane :key="1" tab="知识管理"></a-tab-pane>
          <a-tab-pane :key="2" tab="发布知识">
            <fbzs></fbzs>
          </a-tab-pane>
        </a-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import headerComm from "../header-comm/header.vue";
import zsgl from "../zsgl/zsglym.vue";
import fbzs from "./fbzsym.vue";

export default {
  inject: ["reload"],
  data() {
    return {
      tab_xw: 2
    };
  },

  methods: {
    xwback(key) {
      console.log(key);
      this.tab_xw = key;
      if (key == 1) {
        // this.$children.fbzsflag=true
        // this.$store.state.fbzsflag = true;
        this.$store.state.fbzsval = "";
        this.$store.state.tabsfbzsname = [
          { tp: "gcsdy", name: "工程师答疑", channelId: "1012", classId: "0" }
        ];
        this.$store.state.xiugaiflag = "";
        this.$store.state.content = "";

        this.$router.push("/zsgl");
      } else {
        this.reload();
      }
    },

    linkxw(val) {
      console.log(val);
      this.tab_xw = 2;
    },
    swChange(checked) {
      console.log(`a-switch to ${checked}`);
    }
  },
  components: {
    headerComm,
    zsgl,
    fbzs
  },
  created() {}
};
</script>

<style lang='less'>
.fbzs_tk {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 1000px;
  z-index: 999;
  .fbzs_btn {
    position: absolute;
    top: 13%;
    left: 28%;
    width: 55%;
    height: 230px;
    background: #fff;
    text-align: left;
    padding: 35px;
    button {
      margin: 10px;
    }
  }
}
.xw_box {
  position: relative;
  top: 74px;
  text-align: left;
  background: #fff;
  width: 98%;
  left: 15px;
  padding: 20px 10px;
  height: 900px;
  
  .ant-tabs {
    height: 100%;
  }
}
</style>
